@echo off
REM echo %0
REM echo %~dp0

set dpath=%~dp0
set SERVICE_NAME=OrayClientService
REM 停止当前服务
sc stop %SERVICE_NAME%
REM 卸载服务
sc delete %SERVICE_NAME%
REM 安装服务
sc create %SERVICE_NAME% binPath= "\"%dpath%Service.exe\" -service " start= auto
REM 设置允许服务与桌面交互
sc config %SERVICE_NAME% type= interact type= own
REM 启动服务
sc start %SERVICE_NAME%


